/*
 * Copyright 2020-2021 redragon.dongbin
 *
 * This file is part of redragon-erp/赤龙ERP.

 * redragon-erp/赤龙ERP is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version.

 * redragon-erp/赤龙ERP is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with redragon-erp/赤龙ERP.  If not, see <https://www.gnu.org/licenses/>.
 */
package com.erp.cux.workflow.dao;

import java.util.List;

import org.redragon.framework.hibernate.DaoCRUDIF;
import com.erp.cux.workflow.dao.model.CuxWorkflowRecord;
import com.erp.cux.workflow.dao.model.CuxWorkflowRecordCO;

public interface CuxWorkflowRecordDao extends DaoCRUDIF<CuxWorkflowRecord, CuxWorkflowRecordCO>{
    
    //获取当前单据所处的工作流节点
    public abstract CuxWorkflowRecord getCurrentRecordByBill(String billType, String billHeadCode);
    
    //获取当前单据的上一个节点（驳回使用）
    public abstract CuxWorkflowRecord getLastRecordByBill(String billType, String billHeadCode);
    
    //获取某一单据类型需要某人审批的所有单据
    public abstract List<String> getBillHeadCodesByPerson(String billType, String approvePerson);
    
    //删除单据的所有审批记录
    public abstract void deleteRecordByBill(String billType, String billHeadCode);
    
}